# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=qpwgraph
pkgver=0.6.2
pkgrel=0
pkgdesc="Graph manager for PipeWire"
url="https://gitlab.freedesktop.org/rncbc/qpwgraph"
license="GPL-2.0-or-later"
arch="all"
makedepends="cmake samurai alsa-lib-dev pipewire-dev qt6-qtbase-dev qt6-qtsvg-dev"
subpackages="$pkgname-doc"
source="https://gitlab.freedesktop.org/rncbc/qpwgraph/-/archive/v$pkgver/qpwgraph-v$pkgver.tar.gz
	ungit-version.patch
	"
builddir="$srcdir/$pkgname-v$pkgver"
options="!check" # no test suite

build() {
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCONFIG_WAYLAND=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
92870fe98b94971babe66e6c7d90231f41d1f73e35aa4ca4e913ab5a3a13f5364194cd68d09fcf26880f86444eff8881ac9a89640b89a86e274afb55e4764ee0  qpwgraph-v0.6.2.tar.gz
7770d9d29eb7c58b06dd072fb9ae3ffc57c540b8b54c97a9026eb316a05225768910d2f8369472022fcb5e23d11906f683be33e84d171ebf94653310feb595a8  ungit-version.patch
"
